<template>
	<view class="index_page">
		<view class="top_bg"></view>
		<view class="content">
			<view>
				<image class="img" src="../../static/index/index.png"></image>
			</view>
			<view style="width: 100%;height: 160rpx;"></view>
			<view class="item" style="background-image: url('../../static/index/onebg.png');" @click="toPage(1)">
				<image src="../../static/index/one.png"></image>
				<view style="margin-left: 20rpx;">
					<view style="font-size: 32rpx;font-weight: bold;color: #333333;margin-top: 6rpx;">一口价下单</view>
					<view style="font-size: 28rpx;color: #666666;margin-top: 12rpx;">全国统一标准价，师傅与客户预约上门服务</view>
				</view>
			</view>
			<view class="item" style="background-image: url('../../static/index/twobg.png');"  @click="toPage(2)">
				<image src="../../static/index/two.png"></image>
				<view style="margin-left: 20rpx;">
					<view style="font-size: 32rpx;font-weight: bold;color: #333333;margin-top: 6rpx;">报价下单</view>
					<view style="font-size: 28rpx;color: #666666;margin-top: 12rpx;">师傅报价择优选择后与客户预约上门服务</view>
				</view>
			</view>
			<view class="item" style="background-image: url('../../static/index/threebg.png');"  @click="toPage(3)">
				<image src="../../static/index/three.png"></image>
				<view style="margin-left: 20rpx;">
					<view style="font-size: 32rpx;font-weight: bold;color: #333333;margin-top: 6rpx;">悬赏下单</view>
					<view style="font-size: 28rpx;color: #666666;margin-top: 12rpx;">价格自己定，师傅接单与客户预约上门服务</view>
				</view>
			</view>
			<view class="item" style="background-image: url('../../static/index/fourbg.png');"  @click="toPage(4)">
				<image src="../../static/index/four.png"></image>
				<view style="margin-left: 20rpx;">
					<view style="font-size: 32rpx;font-weight: bold;color: #333333;margin-top: 6rpx;">房屋装饰工程下单</view>
					<view style="font-size: 28rpx;color: #666666;margin-top: 12rpx;">全国统一标准价，师傅与客户预约上门服务</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		onLoad() {
			if(!uni.getStorageSync('tokenVal')){
				uni.navigateTo({
					url:"/pages/login/login"
				})
			}
		},
		methods: {
			toPage(e){
				uni.navigateTo({
					url:"/pages/index/oneprice?type=" + e
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.index_page {
		width: 100vw;
		height: 88vh;
		.top_bg {
			width: 100%;
			height: 200rpx;
			background-color: #00CC7B;
		}

		.content {
			width: 100%;
			height: auto;
			min-height: 1000rpx;
			padding: 0rpx 32rpx;
			position: relative;

			.img {

				width: 686rpx;
				height: 240rpx;
				position: absolute;
				top: -80rpx;
			}

			.item {
				width: 100%;
				height: 160rpx;
				padding: 24rpx 32rpx;
				border-radius: 8rpx;
				margin-top: 32rpx;
				background-size: cover;
				display: flex;
				image{
					width: 80rpx;
					height: 112rpx;
				}
			}
		}
	}
</style>